package mdt;

import java.io.File;
//import java.util.*;
//import java.util.regex.Pattern;

//import mdt.util.StatePreservingMatcher;

public class MarkupComment
{
	private String text, label, filename, path, dirPath;
	//private ArrayList<Headline> headlines;

	public MarkupComment(String _text, String _label, String _filename,
			String _path)
	{
		label = _label;
		filename = _filename;
		path = _path;
		//text = "";
		text = _text;
		
		File f = new File(_path);
		dirPath = f.getParentFile().getAbsolutePath();
		

		//headlines = new ArrayList<Headline>();

		//Replace Type1 Headlines with Type2 headlines
		/*Pattern headlinePattern = Pattern.compile(Configuration.Headline1Regex,
				Pattern.MULTILINE);
		StatePreservingMatcher headlineMatcher = new StatePreservingMatcher(
				headlinePattern.matcher(_text));
		int lastEnd = 0;
		
		while (headlineMatcher.find())
		{
			text += _text.substring(lastEnd, headlineMatcher.start(Configuration.Headline1RegexContent));
			if (headlineMatcher.group(Configuration.Headline1RegexLevel).equals("="))
				text += "# ";
			else
				text += "## ";
			text += headlineMatcher.group(Configuration.Headline1RegexContent);
			lastEnd = headlineMatcher.end();
		}
		
		text += _text.substring(lastEnd);*/
	}

	public String getLabel()
	{
		return label;
	}

	public String getText()
	{
		return text;
	}

	public String getFilename()
	{
		return filename;
	}

	public String getPath()
	{
		return path;
	}

	/*public ArrayList<Headline> getHeadlines()
	{
		return headlines;
	}*/

	public String getDirPath()
	{
		return dirPath;
	}
}
